package org.springblade.weixin.feign;

import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import org.springblade.common.constant.AppConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Feign接口类
 *
 * @author Chill
 */
@FeignClient(
	value = AppConstant.APPLICATION_WEIXIN_SDK_NAME,
	fallback = IWeixinClientFallback.class
)
public interface IWeixinClient {

	String API_PREFIX = "/client";

	String GET_MINIAPP_CODE2_SESSION = API_PREFIX + "/miniapp/get-code2-session";

	@GetMapping(GET_MINIAPP_CODE2_SESSION)
	WxMaJscode2SessionResult getCode2Session(@RequestParam("code") String code);
}
